package com.cqw.datamodel;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-11-15 16:48
 * @Description:
 */
public class Test3 {

    public static void main(String[] args) {
        //计算10的阶乘
        System.out.println(fun(10));
    }

    private static int fun(int i) {
        if (i == 1) {
            return i;
        }
        return i * fun(i - 1);
    }

}
